<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCoreKvTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('core_kv', function (Blueprint $table) {
            $table->increments('id');
            $table->string('keys')->unique()->comment('键');
            $table->longText('values')->nullable()->comment('值');
            $table->longText('other')->nullable()->comment('其它，备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('core_kv');
    }

}

/*  表SQL

CREATE TABLE `core_kv` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `keys` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '键',
    `values` longtext COLLATE utf8_unicode_ci COMMENT '值',
    `other` longtext COLLATE utf8_unicode_ci COMMENT '其它，备注',
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

*/
